<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			img{
				width: 100%;
				height: 100%;
			}
			a{
				text-decoration: none;
				font-size: 40px;
				color: white;
				margin: 0;
				padding: 0;
			}
			div{
				width: 400px;
				height: 450px;
				margin: 0 auto;
				position: relative;
			}
			.a1{
				width: 50px;
				height: 50px;
				position: absolute;
				top: 50%;
				left: 0px;
			}
			.a2{
				width: 50px;
				height: 50px;
				position: absolute;
				top: 50%;
				right:0px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<img :src="arrimg[index]"/>
			<a class="a1" href="#" v-show="index!=0" @click="prev"><</a>
			<a class="a2" href="#" v-show="index<arrimg.length-1" @click="next">></a>
		</div>
	</body>
	<script type="text/javascript">
		var app = new Vue({
			el:"#app",
			data:{
				arrimg:["img/1.png","img/2.png","img/3.png"],
				index:0,
			},
			methods:{
				prev:function(){
					this.index--;
				},
				next:function(){
					this.index++;
				},
			}
		})
	</script>
</html>
